import request from './request'

// 获取标签列表
export function getTagList() {
  return request({
    url: '/tags/',
    method: 'get'
  })
}

// 获取标签详情
export function getTagDetail(slug) {
  return request({
    url: `/tags/${slug}/`,
    method: 'get'
  })
}

// 创建标签
export function createTag(data) {
  return request({
    url: '/tags/',
    method: 'post',
    data
  })
}

// 更新标签
export function updateTag(slug, data) {
  return request({
    url: `/tags/${slug}/`,
    method: 'put',
    data
  })
}

// 删除标签
export function deleteTag(slug) {
  return request({
    url: `/tags/${slug}/`,
    method: 'delete'
  })
} 